<?php
require_once 'init.php';

$page = cf\api\page\get('news');

$smarty->assign('page',$page);
$smarty->assign('pageText',cf\api\page\getText($page['id']));

$smarty->assign(
	'news',
	cf\query2arrays("
		SELECT IFNULL(code,cf_news.id) AS id, dt, name, short_txt 
		FROM cf_news
		ORDER BY dt DESC"
	)
);

show(
	'news_list', 
	$page['name'], 
	array(), 
	$page['title'], 
	$page['keywords'], 
	$page['descr']
);
?>